
from django.contrib import admin
from django.urls import path, include, re_path
from django.conf import settings
from django.views.static import serve # 静态文件代理访问模块


urlpatterns = [
    path('admin/', admin.site.urls),
    path('',include('home.urls')),
    # 通过正则表达式 r'uploads/(?P<path>.*)' 匹配以 /uploads/ 开头的 URL
    re_path(r'uploads/(?P<path>.*)', serve, {"document_root": settings.MEDIA_ROOT}),
]
